import fetch from 'common/src/utils/fetch';
// 获取成绩类型列表
export function getInterResultList(data) {
    return fetch({
        url: '/api/majorservice/interResult/list',
        method: 'post',
        headers: {
            'Content-Type': 'application/json'
        },
        data
    });
}

// 修改
export function updateInterResultType(data) {
    return fetch({
        url: '/api/majorservice/interResult/edit',
        method: 'put',
        headers: {
            'Content-Type': 'application/json'
        },
        data
    });
}

// 查询大类信息
export function findClassPower(data) {
    return fetch({
        url: '/api/welcomeservice/tutorSchool/major/' + data,
        method: 'get',
        headers: {
            'Content-Type': 'application/json'
        },
        data
    });
}

// 查成绩类型
export function interResultTypeDetail(gradeId, majorId) {
    return fetch({
        url: '/api/majorservice/interResultType/detail',
        params: {
            gradeId: gradeId,
            majorId: majorId
        },
        method: 'post',
        headers: {
            'Content-Type': 'application/json'
        },
    });
}

// 查成绩类型
export function getResultType(gradeId, majorId) {
    return fetch({
        url: '/api/majorservice/interResultType/Type',
        params: {
            gradeId: gradeId,
            majorId: majorId
        },
        method: 'post',
        headers: {
            'Content-Type': 'application/json'
        },
    });
}

// 导出成绩
export function exportInterResult(data) {
    return fetch({
        url: '/api/majorservice/interResult/export',
        method: 'post',
        headers: {
            'Content-Type': 'application/json'
        },
        data
    });
}

export function getReportStatus(key) {
    return fetch({
        url: `/api/majorservice/common/exportExcelResult/${key}`,
        method: 'get'
    });
}
